.class public Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper;
.super Ljava/lang/Object;
.source "PermissionHelper.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper$c;,
        Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper$PermissionHandler;,
        Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper$b;
    }
.end annotation


# instance fields
.field private a:Landroidx/fragment/app/FragmentActivity;

.field private b:[Ljava/lang/String;


# direct methods
.method private constructor <init>(Landroidx/fragment/app/FragmentActivity;)V
    .locals 0
    .param p1    # Landroidx/fragment/app/FragmentActivity;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    .line 2
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 3
    iput-object p1, p0, Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper;->a:Landroidx/fragment/app/FragmentActivity;

    return-void
.end method

.method synthetic constructor <init>(Landroidx/fragment/app/FragmentActivity;Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper$a;)V
    .locals 0

    .line 1
    invoke-direct {p0, p1}, Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper;-><init>(Landroidx/fragment/app/FragmentActivity;)V

    return-void
.end method

.method public static a(Landroidx/fragment/app/FragmentActivity;)Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper$b;
    .locals 2
    .param p0    # Landroidx/fragment/app/FragmentActivity;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    .line 2
    new-instance v0, Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper$b;

    const/4 v1, 0x0

    invoke-direct {v0, p0, v1}, Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper$b;-><init>(Landroidx/fragment/app/FragmentActivity;Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper$a;)V

    return-object v0
.end method

.method static synthetic a(Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper;[Ljava/lang/String;)[Ljava/lang/String;
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper;->b:[Ljava/lang/String;

    return-object p1
.end method


# virtual methods
.method public a(Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper$c;)V
    .locals 7
    .param p1    # Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper$c;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    .line 3
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 4
    sget v1, Landroid/os/Build$VERSION;->SDK_INT:I

    const/4 v2, 0x1

    const/16 v3, 0x17

    if-lt v1, v3, :cond_5

    iget-object v1, p0, Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper;->b:[Ljava/lang/String;

    if-nez v1, :cond_0

    goto :goto_1

    .line 5
    :cond_0
    array-length v3, v1

    const/4 v4, 0x0

    :goto_0
    if-ge v4, v3, :cond_2

    aget-object v5, v1, v4

    .line 6
    iget-object v6, p0, Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper;->a:Landroidx/fragment/app/FragmentActivity;

    invoke-static {v6, v5}, Landroidx/core/content/PermissionChecker;->checkSelfPermission(Landroid/content/Context;Ljava/lang/String;)I

    move-result v6

    if-eqz v6, :cond_1

    .line 7
    invoke-interface {v0, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    :cond_1
    add-int/lit8 v4, v4, 0x1

    goto :goto_0

    .line 8
    :cond_2
    invoke-interface {v0}, Ljava/util/List;->isEmpty()Z

    move-result v1

    if-eqz v1, :cond_3

    .line 9
    invoke-interface {p1, v2}, Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper$c;->a(Z)V

    return-void

    .line 10
    :cond_3
    iget-object v1, p0, Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper;->a:Landroidx/fragment/app/FragmentActivity;

    invoke-virtual {v1}, Landroidx/fragment/app/FragmentActivity;->getSupportFragmentManager()Landroidx/fragment/app/FragmentManager;

    move-result-object v1

    .line 11
    const-class v2, Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper$PermissionHandler;

    invoke-virtual {v2}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v2

    .line 12
    invoke-virtual {v1, v2}, Landroidx/fragment/app/FragmentManager;->findFragmentByTag(Ljava/lang/String;)Landroidx/fragment/app/Fragment;

    move-result-object v3

    .line 13
    instance-of v4, v3, Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper$PermissionHandler;

    if-eqz v4, :cond_4

    .line 14
    invoke-virtual {v1}, Landroidx/fragment/app/FragmentManager;->beginTransaction()Landroidx/fragment/app/FragmentTransaction;

    move-result-object v4

    invoke-virtual {v4, v3}, Landroidx/fragment/app/FragmentTransaction;->remove(Landroidx/fragment/app/Fragment;)Landroidx/fragment/app/FragmentTransaction;

    move-result-object v3

    invoke-virtual {v3}, Landroidx/fragment/app/FragmentTransaction;->commitNow()V

    .line 15
    :cond_4
    new-instance v3, Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper$PermissionHandler;

    invoke-direct {v3}, Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper$PermissionHandler;-><init>()V

    .line 16
    invoke-virtual {v1}, Landroidx/fragment/app/FragmentManager;->beginTransaction()Landroidx/fragment/app/FragmentTransaction;

    move-result-object v1

    invoke-virtual {v1, v3, v2}, Landroidx/fragment/app/FragmentTransaction;->add(Landroidx/fragment/app/Fragment;Ljava/lang/String;)Landroidx/fragment/app/FragmentTransaction;

    move-result-object v1

    invoke-virtual {v1}, Landroidx/fragment/app/FragmentTransaction;->commitNow()V

    .line 17
    invoke-virtual {v3, p1}, Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper$PermissionHandler;->a(Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper$c;)V

    .line 18
    invoke-virtual {v3, v0}, Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper$PermissionHandler;->a(Ljava/util/List;)V

    return-void

    .line 19
    :cond_5
    :goto_1
    invoke-interface {p1, v2}, Lcom/estrongs/android/pop/app/filetransfer/PermissionHelper$c;->a(Z)V

    return-void
.end method
